<?php

/**
 * Fixes the slide type field name length
 *
 */
class Db_023_bbce_modify_flickr_slidetype extends Ot_Migrate_Migration_Abstract
{
    public function up($dba)
    {
        //$query = "UPDATE  '" . $this->tablePrefix . "tbl_slidetype' SET 'slidetype' = 'PhotoFeed' WHERE '" . $this->tablePrefix ."tbl_slidetype'.'slidetype' = 'Flickr' LIMIT 1;";
        $query = "UPDATE `". $this->tablePrefix . "tbl_slidetype` SET `slidetype` = 'PhotoFeed' WHERE `" . $this->tablePrefix . "tbl_slidetype`.`slidetype` = 'Flickr' LIMIT 1;";
        
        $dba->query($query);
    }
    
    public function down($dba)
    {       
        $query = "UPDATE '" . $this->tablePrefix . "tbl_slidetype' SET 'slidetype' = 'Flickr' WHERE '" . $this->tablePrefix . "tbl_slidetype'.'slidetype' = 'PhotoFeed' LIMIT 1;";
        $dba->query($query);
    }
}